#SRC=${shell ls *.c}
SRC=${wildcard *.c}
OBJ=${SRC:.c=.o} 
BIN=mycode

$(BIN):$(OBJ)
	@gcc -o $@ $^ -g -std=c99
	@echo "linking ... $^ to $@"
%.o:%.c
	@gcc -c $< -g -std=c99
	@echo "compling ... $< to $@"
.PHONY:
clean:
	@rm -rf $(BIN) $(OBJ)
	@echo "delete $(BIN) $(OBJ)"
.PHONY:
PRINT:
	@echo ${SRC}
	@echo ${OBJ}
	@echo ${BIN}
